package com.xiaoc.bulldozer.service;


import com.xiaoc.bulldozer.common.dto.AwardDto;
import com.xiaoc.bulldozer.common.dto.WeixinUserDto;
import com.xiaoc.bulldozer.common.model.Award;
import com.xiaoc.bulldozer.common.model.AwardTimeRule;

import java.util.Date;

/**
 * describe:
 *
 * @author lihuancheng
 * @date 2018/8/27
 */
public interface AwardFacade {


    /**
     * 开红包
     * @param weixinUserDto
     * @return
     */
    public AwardDto openAward(WeixinUserDto weixinUserDto);

    /**
     * 根据id,userId 获取AwardDto
     *
     * @param id
     * @param userId
     * @return
     */
    public AwardDto getAwardDtoByIdAndUserId(Integer id, Integer userId);


    /**
     * 根据userId获取当前轮次有效注册人数
     *
     * @param userId
     * @return
     */
    public int getCurrentRoundRegistSuccessCountByUserId(Integer userId);

    /**
     * 校验状态获取有效红包金额
     *
     * @param award
     * @return
     */
    public int checkStatusGetAwardFee(Award award);

    /**
     * 到达点赞数量，更新红包状态
     *
     * @param award
     */
    public void reachLikeCountUpdateAwardStatusByAward(Award award);


    /**
     *  获取红包活动时间
     * @param currentDate
     * @return
     */
    public AwardTimeRule awardActivityTime(Date currentDate);

}
